<template>
  <div>
      <el-table
        :data="tableData"
        ref="multipleTable"
        border
        v-loading="loading"
        max-height="350"
        style="width: 100%; margin-top: 20px;">
            <el-table-column prop="" label="序号" min-width="60" :formatter="nShowIndex"align="center"></el-table-column>
            <el-table-column  v-for="item in tableColumn" :label="item.label" min-width="100"align="center">
                <template slot-scope="scope">
                    <span>{{scope.row[item.prop]}}</span>
                </template>
            </el-table-column>
            <!-- <el-table-column prop="deptPnum" label="机构人数" width="100"align="center"></el-table-column>
            <el-table-column label="人均奖金" min-width="100"align="center">
                <template slot-scope="scope">
                    <span v-if="scope.row.deptPnum!=0">{{(scope.row.jjJe*1/scope.row.deptPnum*1).toFixed(4)}}</span>
                    <span v-else>0</span>
                </template>
            </el-table-column>
            <el-table-column prop="jjJe" label="奖金总额(元)" min-width="100"align="center"></el-table-column>
            <el-table-column prop="ryCode" align="center">
                <template slot="header" slot-scope="scope">
                   <span>安全生产奖</span>
                   <el-tooltip placement="top" effect="light" width="1000">
                        <div slot="content">
                        <span>可分配余额：<span class="font22 blue">20000</span>元</span>
                        <span class="ml30">已分配金额：<span class="font22 blue">10000</span>元</span>
                        <div style="display:none"></div>
                        <span class="ml30">剩余可分配额：<span class="font22 blue">10000</span>元</span>
                        </div>
                        <i class="el-icon-warning"></i>
                    </el-tooltip>
                    <el-button type="text">追加</el-button>
                </template>
                <el-table-column prop="ryCode" label="金额(元)" width="100"align="center"></el-table-column>
                <el-table-column prop="ryCode" label="备注" width="100"align="center"></el-table-column>
            </el-table-column> -->
      </el-table>
      <el-button v-if="isfang=='放大'" type="info" style="margin-top:20px;" @click="fangda">全屏</el-button>
  </div>
</template>

<script>
import {updateBmFP} from "@/api/jiangjin/jiangjinjjxxxb"
export default {
    data(){
        return{
            innerVisible:true,
            tableData:[{}],
            pageIndex: 1,
            pageSize: 10,
            totalPage: 0,
            tableColumn:[],
            loading:false,
            isfang:''
        }
    },
    methods:{
        init(fpId,cfLx,isfang){
            this.getupdateBmFP(fpId,cfLx)
            this.isfang=isfang
        },
        getupdateBmFP(fpId,cfLx){
            this.loading=true
            updateBmFP(fpId,cfLx).then(res=>{
                this.tableData=res.data.data.tableData;
                this.tableColumn=res.data.data.tableColumn;
                this.$message.closeAll()
                this.$message.success('已更新数据')
                this.loading=false
            })
        },
        //全屏
        fangda(){
            this.$emit('jigouChild')
        },
        nShowIndex(row, column, cellValue, index) {
            return index + 1 + this.pageSize*(this.pageIndex-1);
        },
    }
}
</script>

<style>
.ffdi{
    padding: 5px 10px;
}
</style>